<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="/socket.io.js"></script>
</head>

<body>
  <img src="<%- qrcode %>" style="width: 300px; height: 300px;" />
  <script>

    var socket = io('http://localhost:8080');
    socket.on('connect',function(){
      console.log('connect ...')
    })
    socket.on('msg', function (data) {
      alert(data)
    })
    socket.on('disconnect',function(){
      console.log('disconnect ...')
    })

  </script>
</body>

</html>